home *** CD-ROM | disk | FTP | other *** search
/ The Canadian & World Encyclopedia 1998 / The Canadian & World Encyclopedia 1998 - Disc 2.iso / mac / prime_CD / pb / MENU.DIR / 00212_Script_init global script < prev    next >
Text File  |  1997-07-23  |  4KB  |  146 lines

  1. global pmroll_list, the_leaf, the_erarolls
  2. on depth_check
  3.   if the colordepth <> 8 then 
  4.     alert "this application performs best when your computer is set to display 256 colours. Please set your display to 256 colours before continuing."
  5.     quit
  6.   end if
  7. end
  8.  
  9. on setmenucursors
  10.   set curvar to [member "hand", member "hand mask"]
  11.   set l to [11,13,14,15,18]
  12.   repeat with x in l
  13.     set the cursor of sprite x to curvar
  14.   end repeat
  15. end
  16.  
  17. on startmovie
  18.   --  depth_check
  19.    setmenucursors -- added to make sure there are cursors when going into menu BAR 4.17.97
  20.   global demo
  21.   set demo = 0
  22.   
  23.   global win31 -- place this value inside the win31 projector to handle special case bugs
  24.   --  set win31 to 1
  25.   if win31 then depth_check
  26.   
  27.   set the searchpath = []
  28.   global gsep, mp
  29.   put the moviepath into mp
  30.   set s = mp&"snd"
  31.   set m = mp&"moovs"
  32.   --  set gr = mp&"gfx"
  33.   
  34.   -- eras path
  35.   set er = mp&"Eras"
  36.   
  37.   
  38.   -- archive path
  39.   set ap = mp & "ARCHIVE"
  40.   if the machinetype < 256 then set sep = ":"
  41.   if the machinetype = 256 then set sep = "\"
  42.   set gsep to sep
  43.   set er1 = er&sep&"la"
  44.   set er2 = er&sep&"gp"
  45.   set er3 = er&sep&"ky"
  46.   set er4 = er&sep&"td"
  47.   set er5 = er&sep&"ty"
  48.   set er6 = er&sep&"ad"
  49.   set er7 = er&sep&"vi"
  50.   
  51.   --  set sap = ap & sep & "SOUND"
  52.   --  set vap = ap & sep & "VIDEO"
  53.   --  set pap = ap & sep & "PICT"
  54.   --  set oap = ap & sep & "OTHER"
  55.   --  set xap = ap & sep & "XOBJ"
  56.   
  57.   
  58.   global glocalpath
  59.   set  the searchPath = [ glocalpath,mp,s,m,er,er1,er2,er3,er4,er5,er6,er7]
  60.   
  61.   if not (the quicktimepresent) then 
  62.     if the colordepth < 9 then puppetPalette "System - Win"
  63.     alert "you do not have quicktime installed on your system"
  64.     alert "You will find a quicktime installer on the CD (see readme)."
  65.     quit
  66.   end if
  67.   put the searchpath into field "path"
  68.   
  69.   --  if the machinetype < 256 then dobackdrop
  70.   
  71.   -- makemenurolls
  72.   
  73. end
  74.  
  75. on makemenurolls
  76.   set pmroll_list = []
  77.   set pmroll_list = [rect(115, 98, 160, 142), rect(163, 98, 208, 142), rect(211, 98, 256, 142), rect(259, 98, 304, 142), rect(307, 98, 351, 142), rect(115, 145, 160, 190), rect(163, 145, 208, 190), rect(211, 145, 256, 190), rect(259, 145, 304, 191), rect(307, 145, 351, 190), rect(115, 193, 160, 239), rect(163, 193, 208, 239), rect(211, 193, 256, 239), rect(259, 193, 304, 239), rect(307, 193, 351, 239), rect(115, 242, 160, 286), rect(163, 242, 208, 286), rect(211, 242, 256, 286), rect(259, 242, 304, 286), rect(307, 242, 351, 286)]
  78.   
  79.   set the_leaf = []
  80.   set the_leaf = [rect(1, 39, 113, 68), rect(1, 67, 113, 96),  rect(1, 95, 113, 124), rect(1, 123, 113, 152), rect(4, 154, 110, 177), rect(4, 182, 110, 205), rect(1, 207, 113, 236), rect(4, 238, 110, 261)]
  81.   
  82.   
  83.   set the_erarolls = []
  84.   set the_erarolls = [rect(113, 95 + 27, 191, 180 + 27), rect(176, 95 + 27, 269, 180 + 27), rect(252, 95 + 27, 341, 180 + 27), rect(321, 95 + 27, 411, 180 + 27), rect(397, 95 + 27, 475, 180 + 27), rect(456, 95 + 27, 530, 180 + 27), rect(515, 95 + 27, 577, 180 + 27)]
  85.   
  86. end
  87.  
  88. on dobackdrop
  89.   global bg  --global variable for our Backdrop instance
  90.   global printer
  91.   
  92.   --only instantiate the backdrop once!
  93.   --creating multiple instances of
  94.   --the backdrop XObject is dangerous!
  95.   
  96.   if objectp(bg)=0 then
  97.     
  98.     --I like to keep xobjects in separate 'XOBJ' files
  99.     --in the same folder as the movie
  100.     --and open the xobject files only when I
  101.     --need to instantiate the XObject
  102.     
  103.     openxlib "backdrop xobj"
  104.     put backdrop(mNew) into bg
  105.     
  106.     --Then I close the file as soon as I'm done
  107.     --to avoid having lots of open files connected
  108.     --to a movie.
  109.     
  110.     closexlib "backdrop xobj"
  111.     
  112.   end if
  113.   
  114.   if objectp(bg) then
  115.     
  116.     --set whether the backdrop hides
  117.     --when we switch to another application
  118.     --(this should be set to match the movie preference
  119.     --"animate in background")
  120.     
  121.     bg (mHideInBack,false)
  122.     
  123.     --set the color of the backdrop
  124.     if the colordepth = 8 then  bg(mSetColor,255)
  125.     else bg(mSetColor, 0)
  126.     
  127.     --show the backdrop while the movie plays
  128.     bg(mShow)
  129.     
  130.   end if
  131.   
  132.   
  133. end
  134.  
  135.  
  136. on closebackdrop
  137.   global bg, printer
  138.   
  139.   --hide the backdrop when the movie's not playing
  140.   --(you don't have to do this if you like to keep the backdrop
  141.   --there while you work on a movie)
  142.   
  143.   if objectp(bg) then bg(mHide)
  144.   
  145. end
  146.